/**
 *
 * @author Doan Tuan Anh
 */
import javax.microedition.lcdui.game.Sprite;
import javax.microedition.lcdui.Image;

public class Heart extends Sprite{
    
    private int posX, posY;
    private static final int TOTAL_FRAME = 1;
     
    public Heart(int initialX, int initialY) throws Exception {
    
        super(Image.createImage("/heart.png"), Image.createImage("/heart.png").getWidth() / TOTAL_FRAME, Image.createImage("/heart.png").getHeight());
        
        defineReferencePixel(super.getWidth() / 2, super.getHeight() / 2);
        
        posX = initialX;
        posY = initialY;
        setRefPixelPosition(posX, posY);
    }
    
    void reset()
    {
        setVisible(true);
    }
}